import request from '@/api/request'

// 创建余额充值订单
export function createRechargeOrder(amount) {
  return request('POST', '/api/balance/create-recharge-order', { amount })
}

// 获取余额信息
export function getBalance() {
  return request('GET', '/api/balance/info', {})
}

// 获取余额记录
export function getBalanceRecords(params) {
  return request('GET', '/api/balance/records', params)
}

// 余额支付
export function balancePayment(planId, months) {
  return request('POST', '/api/balance/balance-payment', { plan_id: planId, months })
}

// 获取余额配置
export function getBalanceConfig() {
  return request('GET', '/api/balance/config', {})
}